<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../common/jspcommon.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<c:choose>
	<c:when test="${not empty product }">
		<title>【图】妈妈推荐：${fn:substring(product.name,0,20)} - 果果街</title>
	</c:when>
	<c:otherwise>
		<title>【图】妈妈推荐：${fn:substring(doing.content,0,20)} - 果果街</title>
	</c:otherwise>
</c:choose>
<meta name="keywords" content="果果,果果网,果果街,淘宝网导购,淘宝母婴,母婴用品,母婴产品,母婴网购,怀孕,孕期,婴幼儿,儿童,0-1岁,1-3岁,3-6岁,妈妈购物分享,逛淘宝,童装,童鞋,玩具,早教,启蒙,亲子,亲子装,纸尿裤,奶粉,母婴类美丽说,母婴类蘑菇街,母婴类爱乐活" />
<meta name="description" content="看看妈妈们为宝宝淘到的好东西，参加品牌母婴电商限时高额返利活动，推荐别人购买自己拿佣金，果果街是妈妈分享育儿消费经验，网购省钱的好地方。" />
<%@ include file="../common/css.jsp"%>
<%@ include file="../common/js.jsp"%>
<script src="/js/copy/copy.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="/css/v4/channel.css"/>
<link type="text/css" rel="stylesheet" href="/css/v4/detail.css"/>
<!--[if ie 6]><script src="../../js/v4/iepng.js" type="text/javascript"></script><![endif]-->
<!--[if ie]><link href="../../css/v4/common/IE.css" type="text/css" rel="stylesheet"><![endif]-->
</head>

<body>
	<!-- head -->
	<%@ include file="../common/header.jsp"%>
	<!-- head--end-->

	<!-- body -->

	<!-- lunbo -->
	<div class="w100p pt20 pb35">
		<div class="w980 mg">
			<div class="wrap clearfix">
				<!-- left -->
				<div class="layout_box1 ">
					<div class="box_s8 mb25">

						<!-- product-detial -->
						<div class="product_box">
							<div class="lay_lr_box share_s1">
								<div class="l_box">
									<a ><img
										src="${doing.memberImageServer}${doing.memberAvatar}"
										width="32" height="32" class=" block" />
									</a>
								</div>
								<div class="r_box">
									<a  class="title">${doing.memberName}</a><span>分享</span>
									<span class="date"><fmt:formatDate
											value="${doing.gmtCreated }" pattern="yyyy-MM-dd HH:mm:ss" />
									</span>
								</div>
							</div>

							<div class="lay_lr_box pro_det">
								<div class="l_box">
									<a class="block mb10"><img alt="${product.name}"
										src="${product.imageServer }${product.picThumb }_468xXXX.jpg"
										width="348" class="block" />
									</a>
									<div class="l_c_nums">
										<span><a class="collection_nums" href="javascript:void(0);" onclick="GUOGUO.loveDoing('${doing.identifier}')">收藏</a><c:if test="${doing.loveAmount>0 }">
												<i>${doing.loveAmount }</i>
											</c:if><b class="red_heart"></b>
										</span> <span><a class=" clr6" href="#51comment">评论</a>
										<c:if test="${doing.commentCount>0 }">
												<i>${doing.commentCount }</i>
											</c:if>
										</span>
									</div>
								</div>
								<div class="r_box">
									<p class="title">
										<a href="/outLink.htm?pid=${product.identifier }"
											target="_blank">${product.name }</a>
									</p>
									<div class="p_d_from">
										<span class="fb">来源于：</span>${product.from }
										<c:if test="${product.from == '淘宝' }">
											<i class="icon_bg tb"></i>
										</c:if>
									</div>
									<div class="p_d_price">
										<c:if
											test="${(product.maxPrice-product.price)>0 && product.from == '淘宝' }">
											<span class="percent">实时价格变化：<i>降价${product.maxPrice-product.price
													}元</i>
											</span>
										</c:if>
										<p class="price">
											<i>￥</i>${product.price }
										</p>
										<div class="p_d_buy_btn">
											<c:choose>
												<c:when test="${product.commission<=0 }">
													<a href="/outLink.htm?pid=${product.identifier }"
														target="_blank" class="def_btn_s1">去店铺购买</a>
												</c:when>
												<c:otherwise>
													<c:choose>
														<c:when test="${onlineUser.member!=null }">
															<a href="/outLink.htm?pid=${product.identifier }"
																target="_blank" class="def_btn_s1">去店铺购买</a>
														</c:when>
														<c:otherwise>
															<a onclick="$(this).next('div').toggle()"
																class="def_btn_s1">去店铺购买</a>
														</c:otherwise>
													</c:choose>
												</c:otherwise>
											</c:choose>
											<div class="fl_tip_box" style="display: none;">
												<span class="icon_triangle_s2"></span>
												<h3>亲，要获得返利必须登录果果街哟！</h3>
												<a href="javascript:GUOGUO.memberLogin();" class="def_btn_s11 espe_link"><i>登录</i>&nbsp;获得返利</a>
												<a href="/outLink.htm?pid=${product.identifier }"
													target="_blank" class="def_btn_s11">不要返利&nbsp;直接去</a>
											</div>
										</div>
										<c:if test="${guoguojieCommissionDisplay=='gcd' }">
											<div class=" buy_tip">
												<div class="top_tip">
													<img src="../../images/v4/other/icon_11.png" /><span>通过此按钮购买</span>
												</div>
												
												<div class="down_tip">
													平均返现 <i>¥<fmt:formatNumber value="${guoguojieCommission}" maxFractionDigits="0"/></i>元
												</div>
											</div>
										</c:if>
										<c:if test="${product.doingProductTime != null }">
										<div class="dc_fl">
                                        	<span class="left_time">${product.doingProductTime.time }</span>
                                            <span class="fl_percent"><fmt:formatNumber value="${product.doingProductTime.guoguojieCommissionRate*100 }" pattern="#"  />%</span>
                                        </div>
                                        </c:if>
									</div>
									<c:if test="${guoguojieCommissionDisplay=='gcd' }">
										<div class="else_tip">
											<a  class="tj_link">>>推荐此商品给别人购买平均返现 <i>¥<fmt:formatNumber value="${guoguojieCommission}" maxFractionDigits="0"/>元</i>
											</a>
											<a href="javascript:void(0);" onclick="commendPruductLink()"
												class=" def_btn_s2">马上推荐</a>
												<!-- <a  class="fx_link">如何返现</a> -->
										</div>
									</c:if>
								</div>
							</div>
						</div>
						<!-- product-detial--end -->

						<div class="separate"></div>

						<!-- comment-box -->
						<div class="review_box pd_s1" id="div_doing_comment"></div>
						<!-- comment-box--end-->
						<div class="shadow"></div>
					</div>
					<div class="t_c_box">
						<h3>我们猜您喜欢</h3>
						<div class="t_c_content clearfix">
							<c:forEach items="${pageModel.list }" var="doing" varStatus="v">
								<div class="item_box box_s1">
									<div class="shadow"></div>
									<div class="pro_box">
										<c:if
											test="${doing.doingProductList[0].from=='淘宝' && (doing.doingProductList[0].maxPrice-doing.doingProductList[0].price)>=10 }">
											<span class=" icon_bg pro_lbl">降价${doing.doingProductList[0].maxPrice-doing.doingProductList[0].price
												}元</span>
										</c:if>
										<div class="love_comment_ope" style="display: none;"
											onmouseover="$(this).show()" onmouseout="$(this).hide()">
											<a href="javascript:void(0);" onclick="GUOGUO.loveDoing('${doing.identifier}')" class="icon_bg">收藏</a><a
												href="/shop/go.htm?pid=${doing.doingProductList[0].identifier }"
												target="_blank" class="icon_bg comment">评论</a>
										</div>
										<a target="_blank"
											href="/shop/go.htm?pid=${doing.doingProductList[0].identifier }"
											class="pic"><img
											src="${doing.doingProductList[0].imageServer }${doing.doingProductList[0].picThumb }_200xXXX.jpg"
											alt="${doing.doingProductList[0].name }"
											title="${doing.doingProductList[0].name }" width="200"
											height="${doing.doingProductList[0].height200xxx }"
											onmouseover="$(this).parent().prev('div').show()"
											onmouseout="$(this).parent().prev('div').hide()"
											class=" block" /> </a>
									</div>
									<div class="pro_t_p">
										<a class="title"> 
										<c:if test="${doing.replaceContent==null }">${doing.doingProductList[0].showName}</c:if>
										<c:if test="${doing.replaceContent!=null }">${doing.showContent}</c:if>
										</a><span class="price">￥${doing.doingProductList[0].price}</span>
									</div>
									<div class="l_c_nums">
										<c:if test="${doing.doingProductList[0].commission>0 }">
											<a
												href="/shop/go.htm?pid=${doing.doingProductList[0].identifier }"
												target="_blank" class="fanli"><img
												src="../../images/v4/other/icon_8.png" class=" block" /> </a>
										</c:if>
										<span><b class="red_heart"></b><a class="collection_nums" href="javascript:void(0);" onclick="GUOGUO.loveDoing('${doing.identifier}')">收藏</a><c:if
												test="${doing.loveAmount>0 }">
												<i>${doing.loveAmount }</i>
											</c:if>
										</span>
									</div>
									<%-- <div class="other_func">
                            <a  class="icon_bg tryout">免费试用</a>
                        </div> --%>
									<div class="comment_box">
										<ul>
											<li
												<c:if test="${fn:length(doing.commentList)>0 }">class="line"</c:if>>
												<div class="lay_lr_box">
													<a  class="l_box" href="/member/tashare.htm?ta=${doing.member}" target="_blank"><img
														src="${doing.memberObj.imageServer }${doing.memberObj.avatar }"
														width="32" height="32" class=" block" /> </a>
													<div class="r_box">
														<a  class="name" href="/member/tashare.htm?ta=${doing.member}" target="_blank">${doing.memberObj.nickname }</a><i
															class="who_share">分享</i>
														<p class="share_time">${doing.doingCreated }</p>
													</div>
												</div></li>
											<c:forEach items="${doing.commentList }" var="c"
												varStatus="v">
												<li class="line">
													<div class="lay_lr_box">
														<a href="/member/tashare.htm?ta=${doing.member}" target="_blank" class="l_box"><img
															src="${c.memberImageServer }${c.memberAvatar }"
															width="32" height="32" class=" block" /> </a>
														<div class="r_box">
															<a href="/member/tashare.htm?ta=${doing.member}" target="_blank" class="name">${c.nickname }</a> <span
																class="info clr9">${c.content }</span>
														</div>
													</div></li>
											</c:forEach>
											<c:if test="${fn:length(doing.commentList)>0 }">
												<li class="last"><a
													href="/shop/go.htm?pid=${doing.doingProductList[0].identifier }"
													target="_blank">查看全部<i>${doing.commentCount }</i>条评论...</a>
												</li>
											</c:if>
										</ul>
									</div>
								</div>
							</c:forEach>
						</div>
					</div>

				</div>
				<!-- left--end-->

				<!-- right-->
				<div class="layout_box3">
					<div class="box_s13">
						<div class=" b_pd_s2 gzw_r ">
							<div class="r_ad_box mb10">
								<a href="${advRight[0].hyperlink }" target="_blank">
									<img src="${advRight[0].picture }" class="block" width="227" height="163" />
								</a>
							</div>
							<div class="r_ad_box mb10">
								<a href="${advRight[1].hyperlink }" target="_blank">
									<img src="${advRight[1].picture }" class="block" width="227" height="61" />
								</a>
							</div>
							<div class="bt_box">
								<div class="title">
									<img src="../../images/v4/other/bt_logo_1.png" />
								</div>
								<div class="bt_tags">
									<a href="/amoy.htm?ai=c1fd788e-590b-4579-b5ef-d21a9f42c92d" target="_blank">怀孕期</a>
									<a href="/amoy.htm?ai=5e02f483-87bd-4d77-81d5-a64ecdc877d0" target="_blank">0-1岁</a>
									<a href="/amoy.htm?ai=1d48a3b9-3709-4270-81b5-0267a5b3546f" target="_blank">1-3岁</a>
									<a href="/amoy.htm?ai=b22c5b02-baa2-42de-ac92-09042e8ccfa2" target="_blank">3-6岁</a>
								</div>
							</div>
							<div class="tags_box hot_tags">
								<c:forEach items="${amoysTags}" var="tag">
	                             	<a href="${tag.hyperlink}" target="_blank">${tag.description}</a>
	                            </c:forEach>
							</div>

							<div class=" rel_talk_list">
								<h3 class="title">相关话题</h3>
								<ul>
								<c:forEach items="${topics}" var="topic">
                                    <li>
                                        <a href="${topic.hyperlink }" class="name" target="_blank">${topic.title}</a>
                                    </li>
                                 </c:forEach>  
								</ul>
							</div>

							<!-- <div class="t_search_box mt15 mb35">
								<input type="text" class="txt"> <input type="button"
									class="btn">
							</div> -->

						</div>
						<div class="shadow"></div>
					</div>

				</div>
				<!-- right--end-->
			</div>
		</div>
	</div>
	<!-- lunbo--end-->
	<%@include file="../common/footer.jsp" %>
	<!-- body--end-->
	<script type="text/javascript">
		$(function() {

			//加载评论
			loadComment();
	<%-- 图片加载完之后给div赋值样式 --%>
		$("div.t_c_content").masonry({
				itemSelector : '.item_box',
				columnWidth : 240,
				isAnimated : false
			});

		});

		//评论
		function loadComment() {
			$("#div_doing_comment").load(
					"/getDoingComment.htm?doingId=${doing.identifier}",
					function() {
						$("#comment_count").html("${doing.commentCount}条评论");
					});
		}

		//评论
		function commentDoing() {
			if (!GUOGUO.checkLogin()) {
				GUOGUO.memberLogin();
			} else {
				var doingId = "${doing.identifier}";
				var commentText = $("#commentText").val();
				if (commentText == "") {
					alert("请输入评论内容");
					return;
				}
				$.post("/addDoingComment.htm", {
					'content' : commentText,
					'commentId' : doingId,
					'commentIdType' : "doingid"
				}, function(data) {
					if (data == "NO1") {
						luckRank();
					}
					$("#commentText").val("");
					loadComment();

				});
			}
		}

		//马上分享此商品
		function commendPruductLink() {
			if (!GUOGUO.checkLogin()) {
				GUOGUO.memberLogin();
			} else {
				if ($("#commend_product_link_dialog").size() < 1) {
					$(document.body).append(
							"<div id='commend_product_link_dialog'></div>");
				}
				$("#commend_product_link_dialog").load(
						"/commendlink.htm?id=${product.identifier }&commision=${guoguojieCommission}");
			}
		}

		function buyChoose() {
			alert(GUOGUO.checkLogin());
		}
	</script>
</body>
</html>